//
//  BenchmarkTestCase.h
//  GCDBenchmark
//
//  Created by Claude on 2025/10/13.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

// 测试用例类型枚举
typedef NS_ENUM(NSInteger, BenchmarkTestCaseType) {
    BenchmarkTestCaseTypeForkJoin,
    BenchmarkTestCaseTypeFibonacci,
    BenchmarkTestCaseTypeAriawNSOperation,
    BenchmarkTestCaseTypeAriawSemaphore,
    BenchmarkTestCaseTypeSerialQueue,
    BenchmarkTestCaseTypeConcurrentQueue,
    BenchmarkTestCaseTypePeriodicTasks,
    BenchmarkTestCaseTypePlayback
};

// 测试用例数据模型
extern NSString * const kParamTaskType;
extern NSString * const kParamTaskCount;
extern NSString * const kParamTaskDuration;
extern NSString * const kParamQoS;
extern NSString * const kParamBufferCount;
extern NSString * const kParamSliceCount;
extern NSString * const kParamMaxConcurrency;
extern NSString * const kParamSubmitInterval;
extern NSString * const kParamPeriod;
extern NSString * const kParamRunDuration;
extern NSString * const kParamFibDepth;
extern NSString * const kParamSelectedFileName;

@interface BenchmarkTestCase : NSObject

@property (nonatomic, assign) BenchmarkTestCaseType type;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *icon;

// 个性化参数
@property (nonatomic, strong) NSMutableDictionary<NSString *, id> *customParams;

// 初始化方法
- (instancetype)initWithType:(BenchmarkTestCaseType)type
                        name:(NSString *)name
                        icon:(NSString *)icon;

// 获取显示的参数描述
- (NSString *)parameterDescription;

// 获取 UserDefaults key 前缀
- (NSString *)userDefaultsKeyPrefix;

// 持久化保存当前参数
- (void)persistCustomParams;

@end

NS_ASSUME_NONNULL_END
